#!/bin/sh
#
# info -- get the info of a specified lab
#
# Copyright (C) 2016-2020 Wu Zhangjin <lzufalcon@163.com>
#

uname | grep -q MINGW && PWD_OPT="-W"
TOP_DIR="$(cd "$(dirname "$0")"/../../ && pwd $PWD_OPT)"
. "$TOP_DIR/tools/docker/config" $* >/dev/null

# Check status
docker ps -f name=$CONTAINER_NAME | grep -qv PORTS
[ $? -ne 0 ] && echo "LOG: $LAB_NAME is not running." && exit 1

echo
echo "IP: $VNC_IP"
echo "Unix User: $UNIX_USER"
echo "Unix Password: $UNIX_PWD"
echo
echo "VNC Token: $VNC_TOKEN"
echo "VNC Password (Normal): $VNC_PWD"
echo "VNC Password (Viewonly): $VNC_PWD_VIEWONLY"
echo
